package com.auth.manager.web;

import com.auth.manager.common.resp.Result;
import com.auth.manager.service.index.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @version 1.0.0
 * @Date: 2022/5/8 17:09
 * @Author ZhuYouBin
 * @Description 首页控制器
 */
@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private IndexService indexService;

    @GetMapping("/getCardData")
    public Result getCardData() {
        Map<String, Long> data = indexService.findIndexCardData();
        return Result.success("查询成功").setData(data);
    }

}
